<template>
  <div class="home-container">
    <el-row justify="center" align="middle" class="hero-section">
      <el-col :span="24" class="text-center">
        <h1>短链 - 为短而生</h1>
        <p class="subtitle">简单、快速、安全的链接缩短服务</p>
        <div class="action-buttons">
          <el-button type="primary" size="large" @click="$router.push('/login')">
            立即登录
          </el-button>
          <el-button size="large" @click="$router.push('/register')">
            免费注册
          </el-button>
        </div>
      </el-col>
    </el-row>

    <el-row :gutter="20" class="features-section">
      <el-col :span="8">
        <el-card class="feature-card">
          <template #header>
            <div class="card-header">
              <el-icon size="24"><Link /></el-icon>
              <h3>链接缩短</h3>
            </div>
          </template>
          <p>快速生成短链接，让分享更简单</p>
        </el-card>
      </el-col>
      
      <el-col :span="8">
        <el-card class="feature-card">
          <template #header>
            <div class="card-header">
              <el-icon size="24"><Collection /></el-icon>
              <h3>标签管理</h3>
            </div>
          </template>
          <p>分类整理链接，高效管理不同场景</p>
        </el-card>
      </el-col>
      
      <el-col :span="8">
        <el-card class="feature-card">
          <template #header>
            <div class="card-header">
              <el-icon size="24"><DataLine /></el-icon>
              <h3>数据统计</h3>
            </div>
          </template>
          <p>详细的访问数据，助力链接优化</p>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
import { Link, Collection, DataLine } from '@element-plus/icons-vue'
</script>

<style scoped>
.home-container {
  min-height: 100vh;
  padding: 40px;
  background-color: #f5f7fa;
}

.hero-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.text-center {
  text-align: center;
}

h1 {
  font-size: 2.5em;
  color: #303133;
  margin-bottom: 20px;
}

.subtitle {
  font-size: 1.2em;
  color: #606266;
  margin-bottom: 40px;
}

.action-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.features-section {
  margin-top: 60px;
}

.feature-card {
  height: 100%;
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-header h3 {
  margin: 0;
  color: #303133;
}

.el-icon {
  color: #409eff;
}
</style> 